$OpenBSD: patch-main_cc,v 1.3 2017/04/19 18:14:56 jca Exp $
--- main.cc.orig	Sat Dec  2 02:18:39 2000
+++ main.cc	Wed Apr 19 20:11:45 2017
@@ -1,5 +1,5 @@
-#include <iostream.h>
-#include <strstream.h>
+#include <iostream>
+#include <strstream>
 #include <stdlib.h>
 #include <setjmp.h>
 #include <unistd.h>
@@ -675,6 +675,8 @@ changeSettings() {
   
   while (true) {
     command = readline("[prepop Settings]> ");
+    if (!command)
+      break;
     
     if (strlen(command) > 100) {
       ptrAlloc->freeMem(command);
@@ -949,6 +951,8 @@ main(int argc) {
   
   while (true) {
     command = readline(prompt);
+    if (!command)
+      break;
     if (strlen(command) > 255) {
       ptrAlloc->freeMem(command);
       ptrDisplay->showError("Input is limited to 255 characters!");
